// mycomponent/yz_homeButton.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    datas: {
      type: null
    },
    title: {
      type: null,
    },
    store_id:{
      type:null
    }
  },
  observers:{
    'datas':function(era){
      console.log(era,'ssss');
    }
  },
  /**
   * 组件的初始数据
   */
  data: {
    toolbar: false
  },

  /**
   * 组件的方法列表
   */
  methods: {
    gotoAlone(e){
      let name = e.currentTarget.dataset.name;
      if(name == 'release'){
        wx.navigateTo({
          url: "/packageC/micro_communities/microRelease/microRelease",
        });
      }else if(name == 'home'){
        wx.redirectTo({
          url: "/packageG/independent_store/index/index?store_id="+this.data.store_id,
        });
      }else if(name == 'my'){
        wx.redirectTo({
          url: "/packageG/member_v2/member_v2",
        });
      }
    },
    showToolbar() {
      this.setData({
        toolbar: !this.data.toolbar
      });
    },
    toPage(e){
      if(!e.currentTarget.dataset.item.url) return;
      wx.navigateTo({
        url: e.currentTarget.dataset.item.url
      });
    }
  }
});
